package net.seehealth.healthpad.ui.view;

import net.seehealth.healthpad.R;
import android.content.Context;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.LinearLayout;
import android.widget.TextView;


public class MedicalReportTimeView extends LinearLayout {

	/** 要显示在的上下文*/
	private Context mContext;
	
	/** 时间确认框*/
	private CheckBox mCheckBox;
	
	/** 要显示的内容*/
	private TextView mContent;
	
	/**
	 * 构造方法
	 * @param context 当前上下文
	 * @param id item的id
	 * @param subShow 是否显示内容（下）
	 */
	public MedicalReportTimeView(Context context) {
		super(context);
		mContext = context;
		
		initialize();
	}
	
	/**
	 * 初始化
	 */
	private void initialize() {
		View view = LayoutInflater.from(mContext).inflate(
        		R.layout.pop_gridview_medical_report_time_item, null); 
		mCheckBox = (CheckBox) view.findViewById(R.id.cb_medical_report_time_item);
		mContent = (TextView) view.findViewById(R.id.tv_medical_report_time_item);
		
		LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
				ViewGroup.LayoutParams.WRAP_CONTENT, 50);
		lp.gravity = Gravity.CENTER;
		addView(view, lp);
	}
	
	/**
	 * 设置当前Item的值
	 * @param content 显示的内容
	 */
	public void updateView(String content) {
		mContent.setText(content);
	}
	
	/**
	 * 选择框监听器
	 */
/*	OnCheckedChangeListener checkListener = new OnCheckedChangeListener() {
		
		@Override
		public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
			
			
		}
	};*/

}
